Skip to contentSkip to conversation

Change in openvpn[master]: Fix compiler warning in reliable.c with --disable-debug

Openvpn-devel In review flichtenheld (Code Review) 3 participants 7 messages Jul 10, 2025 – Jul 31, 2025 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): gerrit.1752140383000.Icad1a52d14311a6f06bda081cab2f4bded8d47ed@...2715...

#1 lore raw

Attention is currently required from: plaisthos.

Hello plaisthos,

I'd like you to do a code review.
Please visit

    http://gerrit.openvpn.net/c/openvpn/+/1082?usp=email

to review the following change.

Change subject: Fix compiler warning in reliable.c with --disable-debug
......................................................................

Fix compiler warning in reliable.c with --disable-debug

Use the easy way out. Using pre-compiler to completely avoid n_active seems like overkill.

Change-Id Icad1a52d14311a6f06bda081cab2f4bded8d47ed

---
M src/openvpn/reliable.c

1 file changed, 1 insertion(+), 0 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/82/1082/1

src/openvpn/reliable.c +1 -0
index 6aef112..424d194 100644
@@ -648,6 +648,7 @@
             }
         }
     }
+    (void)n_active; /* dmsg might not generate code */
     dmsg(D_REL_DEBUG, "ACK reliable_can_send active=%d current=%d : %s",
          n_active,
          n_current,

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1082?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Icad1a52d14311a6f06bda081cab2f4bded8d47ed
Gerrit-Change-Number: 1082
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-MessageType: newchange

#2 lore raw
In reply to a message not in the archive

Attention is currently required from: flichtenheld.

plaisthos has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/1082?usp=email )

Change subject: Fix compiler warning in reliable.c with --disable-debug
......................................................................

Patch Set 1: Code-Review+2

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1082?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Icad1a52d14311a6f06bda081cab2f4bded8d47ed
Gerrit-Change-Number: 1082
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Comment-Date: Thu, 10 Jul 2025 10:21:18 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment

#3 lore raw

PATCH 1/1 Fix compiler warning in reliable.c with --disable-debug

In reply to a message not in the archive

Use the easy way out. Using pre-compiler to completely avoid n_active seems like overkill.

Change-Id Icad1a52d14311a6f06bda081cab2f4bded8d47ed

---

This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1082
This mail reflects revision 1 of this Change.

Acked-by according to Gerrit (reflected above):
Arne Schwabe <[email protected]...>

src/openvpn/reliable.c +1 -0
index 6aef112..424d194 100644
@@ -648,6 +648,7 @@
             }
         }
     }
+    (void)n_active; /* dmsg might not generate code */
     dmsg(D_REL_DEBUG, "ACK reliable_can_send active=%d current=%d : %s",
          n_active,
          n_current,
#4 lore raw

[Openvpn-devel] [PATCH applied] Re: Fix compiler warning in reliable.c with --disable-debug

Interesting trick :-)

Looking forward to see the first patch come in to remove this "totally useless line" again. But that's what "git blame" is for...

Since the buildbots are happy and this line explicitly does nothing I have not tested this further.

Your patch has been applied to the master branch.

commit fcd8f0f9fccdba02ed643dee5df7422ba36ced12

Author: Frank Lichtenheld
Date:   Fri Jul 11 12:04:05 2025 +0200
     Fix compiler warning in reliable.c with --disable-debug

     Signed-off-by: Frank Lichtenheld <[email protected]...>
     Acked-by: Arne Schwabe <[email protected]...>
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg32107.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering

#5 lore raw

Re: [Openvpn-devel] [PATCH applied] Re: Fix compiler warning in reliable.c with --disable-debug

Hi,

Quoted 8 lines · Gert Doering

Interesting trick :-)

Looking forward to see the first patch come in to remove this "totally useless line" again. But that's what "git blame" is for...

Since the buildbots are happy and this line explicitly does nothing I have not tested this further.

Quoted 7 lines

Your patch has been applied to the master branch.

commit fcd8f0f9fccdba02ed643dee5df7422ba36ced12

Author: Frank Lichtenheld
Date:   Fri Jul 11 12:04:05 2025 +0200

Fix compiler warning in reliable.c with --disable-debug

As it makes sense, backported ("cherry-pick -x", trivial) to release/2.6 as well.

commit abd2e52a3142e72b79532b82c02bfa7aa9e3c0aa (HEAD -> release/2.6)

Author: Frank Lichtenheld <[email protected]...>
Date:   Fri Jul 11 12:04:05 2025 +0200

Fix compiler warning in reliable.c with --disable-debug

gert

Signature · 6 lines
"If was one thing all people took for granted, was conviction that if you 
 feed honest figures into a computer, honest figures come out. Never doubted 
 it myself till I met a computer with a sense of humor."
                             Robert A. Heinlein, The Moon is a Harsh Mistress

Gert Doering - Munich, Germany                             [email protected]...
#6 lore raw
In reply to a message not in the archive

cron2 has uploaded a new patch set (#2) to the change originally created by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1082?usp=email )

The following approvals got outdated and were removed:
Code-Review+2 by plaisthos

Change subject: Fix compiler warning in reliable.c with --disable-debug
......................................................................

Fix compiler warning in reliable.c with --disable-debug

Use the easy way out. Using pre-compiler to completely avoid n_active seems like overkill.

Change-Id Icad1a52d14311a6f06bda081cab2f4bded8d47ed

Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg32107.html

---
M src/openvpn/reliable.c

1 file changed, 1 insertion(+), 0 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/82/1082/2

src/openvpn/reliable.c +1 -0
index 6aef112..424d194 100644
@@ -648,6 +648,7 @@
             }
         }
     }
+    (void)n_active; /* dmsg might not generate code */
     dmsg(D_REL_DEBUG, "ACK reliable_can_send active=%d current=%d : %s",
          n_active,
          n_current,

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1082?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Icad1a52d14311a6f06bda081cab2f4bded8d47ed
Gerrit-Change-Number: 1082
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: newpatchset

#7 lore raw
In reply to a message not in the archive

cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/1082?usp=email )

Change subject: Fix compiler warning in reliable.c with --disable-debug
......................................................................

Fix compiler warning in reliable.c with --disable-debug

Use the easy way out. Using pre-compiler to completely avoid n_active seems like overkill.

Change-Id Icad1a52d14311a6f06bda081cab2f4bded8d47ed

Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg32107.html

---
M src/openvpn/reliable.c

1 file changed, 1 insertion(+), 0 deletions(-)
src/openvpn/reliable.c +1 -0
index 6aef112..424d194 100644
@@ -648,6 +648,7 @@
             }
         }
     }
+    (void)n_active; /* dmsg might not generate code */
     dmsg(D_REL_DEBUG, "ACK reliable_can_send active=%d current=%d : %s",
          n_active,
          n_current,

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1082?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Icad1a52d14311a6f06bda081cab2f4bded8d47ed
Gerrit-Change-Number: 1082
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: merged